package com.example.daiyinuo.observer;

public class CurrentObserver implements Observer{
    private Subject subject;

    public CurrentObserver(Subject subject){
        this.subject = subject;
        subject.registerObserver(this);
    }
    @Override
    public void update(float temp, float humidity, float pressure) {
        System.out.println("从气象局接订阅中收到的信息温度，湿度，压强"+temp+humidity+pressure);
    }
}
